package steffens.java.gui.treeview.model;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

public class TreeListUnitTest {

//	static TreeList<String> data = null;
	
	@Before
	public void setUp() throws Exception {
		TreeList<String> data = new TreeList<>();
		String[] elements1 = new String[]{"0","1","2","3","4","5","6","7","8","9"};
		String[] elements2 = new String[]{"a","b","c","d"};
		String[] elements3 = new String[]{"e","f","g","h"};
		String[] elements4 = new String[]{"i","j","k","l"};
		String[] elements5 = new String[]{"m","n","o","p"};
		String[] elements6 = new String[]{"q","r","s","t"};
		String[] elements7 = new String[]{"u","v","w","x"};
		String[] elements8 = new String[]{"y","z","!","?"};
		String[] elements9 = new String[]{"(","=",")"};
		for(String e: elements1){
			data.add(e);
		}
		for(String e: elements1){
			for(String e1: elements2){
				data.addChild(e, e1);
			}
		}
		for(String e: elements1){
			for(String e1: elements2){
				for(String e2: elements3){
					data.addChild(e1, e2);
				}
			}
		}
		
		
//		for(String e2: elements3){
//			data.addChild(e1, e2);
//		}
		printTree(data, 0);
	}
	
	private static void printTree(TreeList<String> list, int depth){
		TreeIterator<String> iterator = list.iterator();
		while(iterator.hasNext()){
			for(int i = 0 ; i < depth; i++)System.out.print("\t");
			String e = iterator.next();
			System.out.println(iterator.getIndex() +" "+e);
			if(iterator.hasChildren()){
				printTree(iterator.getChildren(), depth+1);
			}
		}
	}

	@Test
	public void testSize() {
		fail("Not yet implemented");
	}

	@Test
	public void testIsEmpty() {
		fail("Not yet implemented");
	}

	@Test
	public void testIterator() {
		fail("Not yet implemented");
	}

	@Test
	public void testAddT() {
		fail("Not yet implemented");
	}

	@Test
	public void testAddTInt() {
		fail("Not yet implemented");
	}

	@Test
	public void testAddChild() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetPath() {
		fail("Not yet implemented");
	}

	@Test
	public void testRemove() {
		fail("Not yet implemented");
	}

	@Test
	public void testIndexOfT() {
		fail("Not yet implemented");
	}

	@Test
	public void testIndexOfTInt() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetElementInt() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetElementIntArray() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetChildrenTInt() {
		fail("Not yet implemented");
	}

	@Test
	public void testGetChildrenT() {
		fail("Not yet implemented");
	}

	@Test
	public void testClear() {
		fail("Not yet implemented");
	}

}
